<%@ page language="java" contentType="text/html;charset=utf-8" pageEncoding="utf-8"%>
<!DOCTYPE HTML>
<html style="overflow-y:hidden;">

<head>
    <meta charset="utf-8">
    <title>巧艺平台</title>

</head>
<body>
<header class="Hui-header cl">
    <a class="Hui-logo l" title="H-ui.admin v2.3" href="/">巧艺平台</a>
    <ul class="Hui-userbar">
        <%--<li>超级管理员</li>--%>
        <li class="dropDown dropDown_hover"><a href="#" class="dropDown_A">${user.name}<i class="Hui-iconfont">&#xe6d5;</i></a>
            <ul class="dropDown-menu radius box-shadow">
                <li id="loginAccount"><a href="#">个人信息</a></li>
                <li id="modifyPwd"><a href="#">修改密码</a></li>

                <li id="logout"><a href="#" >退出</a></li>
            </ul>
        </li>
     <!--   <li id="Hui-msg"> <a href="#" title="消息"><span class="badge badge-danger">1</span><i class="Hui-iconfont" style="font-size:18px">&#xe68a;</i></a> </li>-->
        <li id="Hui-skin" class="dropDown right dropDown_hover"><a href="javascript:;" title="换肤"><i class="Hui-iconfont" style="font-size:18px">&#xe62a;</i></a>
            <ul class="dropDown-menu radius box-shadow">
                <li><a href="javascript:;" data-val="default" title="默认（黑色）">默认（黑色）</a></li>
                <li><a href="javascript:;" data-val="blue" title="蓝色">蓝色</a></li>
                <li><a href="javascript:;" data-val="green" title="绿色">绿色</a></li>
                <li><a href="javascript:;" data-val="red" title="红色">红色</a></li>
                <li><a href="javascript:;" data-val="yellow" title="黄色">黄色</a></li>
                <li><a href="javascript:;" data-val="orange" title="绿色">橙色</a></li>
            </ul>
        </li>
    </ul>
    <a aria-hidden="false" class="Hui-nav-toggle" href="#"></a> </header>
<aside class="Hui-aside">
    <input runat="server" id="divScrollValue" type="hidden" value="" />
    <div class="menu_dropdown bk_2"id='leftmenu'>

    </div>
</aside>
<div class="dislpayArrow"><a class="pngfix" href="javascript:void(0);" onClick="displaynavbar(this)"></a></div>
<section class="Hui-article-box">
    <div id="Hui-tabNav" class="Hui-tabNav">
        <div class="Hui-tabNav-wp">
            <ul id="min_title_list" class="acrossTab cl">
                <li class="active"><span title="我的桌面" data-href="welcome.html">我的桌面</span><em></em></li>
            </ul>
        </div>
        <div class="Hui-tabNav-more btn-group"><a id="js-tabNav-prev" class="btn radius btn-default size-S" href="javascript:;"><i class="Hui-iconfont">&#xe6d4;</i></a><a id="js-tabNav-next" class="btn radius btn-default size-S" href="javascript:;"><i class="Hui-iconfont">&#xe6d7;</i></a></div>
    </div>
    <div id="iframe_box" class="Hui-article">
        <div class="show_iframe">
            <div style="display:none" class="loading"></div>
            <iframe scrolling="yes" frameborder="0" src="<%=request.getContextPath()%>/back/welcome.do"></iframe>
        </div>
    </div>
</section>
</body>

</html>
<%@ include file="../head-ui.jsp"%>
<script type="text/javascript">
    var menus =null;

    $(function(){
        <%--setInterval(function(){--%>
            <%--$.ajax({--%>
                <%--url:'<%=request.getContextPath()%>/back/checkSessionStatus.do',--%>
                <%--type:'get',--%>
                <%--async: false,--%>
                <%--success:function(data){--%>
                    <%--if(data.result==false){--%>
                        <%--layer.confirm('请返回登陆页面后重新登陆!',function(){--%>
                           <%--logout();--%>

                        <%--});--%>
                    <%--}--%>

                <%--}--%>
            <%--})--%>
        <%--},1000*30);--%>
        $.cookie("unid",'${user.unid}');
        $.cookie("code",'${user.code}');
        $.cookie("name",'${user.name}');
        $.cookie("departname",'${user.departname}');

        $("#loginAccount").click(function(){

            layer_show('用户编辑',$("#contextPath").val()+"/back/user/edit_page.do?unid="+$.cookie("unid"),'500','510');
        })
        $("#modifyPwd").click(function(){
            layer_show('密码修改',$("#contextPath").val()+"/back/user/password_page.do?unid="+$.cookie("unid"),'400','300');

        })
        $.ajax({
            url:'<%=request.getContextPath()%>/back/getMenu.do',
            type:'get',
            async: false,
            success:function(data){
                menus = data;
                initLeftMenu();

            }
        })
        function logout(){
            var unid =  $.cookie("unid");
            $.cookie("unid",null);
            $.cookie("code",null);
            $.cookie("name",null);
            $.cookie("departname",null);
            window.location.href = "<%=request.getContextPath()%>/back/logout.do";
        }
        $("#logout").click(function(){
            logout();
        })

    })
    function initLeftMenu(){
        var menulist ='';
        $.each(menus, function(i, n) {
            menulist +="<dl id='"+n.unid+"'><dt><i class='Hui-iconfont'>&#xe613;</i>  "+n.menuname+
                    "<i class='Hui-iconfont menu_dropdown-arrow'>&#xe6d5;</i></dt><dd><ul>";
            $.each(n.child, function(j, o) {
                menulist += "<li><a _href='<%=request.getContextPath()%>"+o.url+"' href='javascript:void(0)'>" + o.menuname + "</a> ";

                if(o.child && o.child.length>0)
                {
                    menulist += '<ul style="padding-left: 20px;display: none">';
                    $.each(o.child,function(k,p){
                        menulist += "<li><a _href='<%=request.getContextPath()%>"+p.url+"' href='javascript:void(0)'>" + p.menuname + "</a></li> ";
                    });
                    menulist += '</ul>';
                }

                menulist+='</li>';
            })
            menulist += '</ul></dd></dl>';
        });
        $("#leftmenu").html(menulist);

    }
</script>

<script type="text/javascript" src="<%=request.getContextPath()%>/resources/jsframe/js/H-ui.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/resources/jsframe/js/H-ui.admin.js"></script>
